﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace HigLabo.Net.Twitter
{
    public partial class TwitterClient
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="woeID"></param>
        /// <returns></returns>
        public TrendsCollection GetTrendsPlace(Int32 woeID)
        {
            GetTrendsPlaceCommand command = new GetTrendsPlaceCommand();
            command.WoeID = woeID;
            return GetTrendsPlace(command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public TrendsCollection GetTrendsPlace(GetTrendsPlaceCommand command)
        {
            String jsonText = this.GetResultText(TwitterApiUrl.Version1_1.LocalTrends.GetTrendsPlaceUrl, command);
            return new TrendsCollection(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public TrendLocationCollection GetTrendsClosest(Double latitude, Double longitude)
        {
            GetTrendsClosestCommand command = new GetTrendsClosestCommand() { Latitude = latitude, Longitude = longitude };
            return GetTrendsClosest(command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public TrendLocationCollection GetTrendsClosest(GetTrendsClosestCommand command)
        {
            String jsonText = this.GetResultText(TwitterApiUrl.Version1_1.LocalTrends.GetTrendsClosestUrl, command);
            return new TrendLocationCollection(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public TrendLocationCollection GetTrendsAvailable()
        {
            String jsonText = this.GetResultText(TwitterApiUrl.Version1_1.LocalTrends.GetTrendsAvailableUrl);
            return new TrendLocationCollection(jsonText);
        }
    }
}
